
package cn.qitom.service.user.feign;


import cn.qitom.app.LegoAppConstant;
import cn.qitom.core.tool.api.R;
import cn.qitom.service.user.entity.UserBase;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;



/**
 * User Feign接口类
 *
 */
@FeignClient(
	value = LegoAppConstant.LEGO_USER_APP_NAME
)
public interface IUserClient {

	String API_PREFIX = "/client";
	String USER_INFO = API_PREFIX + "/user-info";
	String USER_LOGIN_INFO = API_PREFIX + "/user-login-info";
	String USER_LOGIN_INFO_BY_ACCOUNT = API_PREFIX + "/user-login-info-by-account";

	/**
	 * 获取用户信息
	 *
	 * @param userId 用户id
	 * @return
	 */
	@GetMapping(USER_LOGIN_INFO)
	R<UserBase> userInfoById(@RequestParam("userId") Long userId);

	/**
	 *
	 * @param phone
	 * @param password
	 * @return
	 */
	@GetMapping(USER_LOGIN_INFO)
	R<UserBase> userLoginInfo(@RequestParam("phone") String phone,@RequestParam("password")String password);

	@GetMapping(USER_LOGIN_INFO_BY_ACCOUNT)
	R<UserBase> userLoginInfoByAccount(@RequestParam("account") String account,@RequestParam("password")String password);


}
